package com.nuc.controller;

import com.nuc.pojo.Result;
import com.nuc.utils.ResultUtils;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Zhang Chao
 * @Date 2021/5/11 11:37
 * @Version 1.0
 */
@RestController
@RequestMapping("/test")
public class TestController {
    @GetMapping("test1")
    public Result add(@RequestParam("Id") Integer Id){
        if(Id>0){
            return ResultUtils.success(Id);
        }else{
            return ResultUtils.error(Id);
        }
    }
}
